# *-* encoding: utf8 *-* 

from django.db import models

class Estatico(models.Model):
    link = models.CharField(max_length=20)
    label = models.CharField(max_length=50, verbose_name='Titulo')
    conteudo = models.TextField()
    
    def __unicode__(self):
        return self.label

class Post(models.Model):

    titulo = models.CharField(max_length=20)
    conteudo = models.TextField()
    author = models.TextField(default=u'Organização do Flisol Maringá', editable=False)
    date = models.DateTimeField(auto_now=True)

    def __unicode__(self):
        return self.titulo

class Publicidade(models.Model):

    AJUDA_CHOICES = (
        (u'R', u'Realização'),
        (u'P', u'Patrocinio'),
        (u'A', u'Apoio'),
        (u'L', u'Links'),
    )

    nome = models.CharField(max_length=50)
    link = models.URLField(max_length=100)
    logotipo = models.ImageField(upload_to='logo')
    tipo = models.CharField(max_length=2, choices=AJUDA_CHOICES)

    def __unicode__(self):
        return self.nome
